<div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
    <div class="am-offcanvas-bar admin-offcanvas-bar">
        <ul class="am-list admin-sidebar-list">
            [#if !(category.parent??)]
            <li><a href="${category.url!}" title="${category.name!}"><span class="am-icon-home"></span>${category.name!}</a></li>
            <!-- 二级类别 开始-->
                [#if category.child?size&gt;0]
                [@shop_Category parentId=category.id]
                [#list tag_list as ctg]
                [#if ctg.child?size&gt;0]
                <li class="admin-parent">
                    <a href="${ctg.url!}" title="${ctg.name!}" >${ctg.name!}</a>

            <!-- 三级类别 开始-->
                 <ul class="am-list am-collapse admin-sidebar-sub am-in" >
                     [@shop_Category parentId=ctg.id]
                     [#list tag_list as ctg1]
                     [#if ctg1.child?size&gt;0]
                     <li class="child">
                         <a href="${ctg1.url!}" title="${ctg1.name!}">${ctg1.name!}</a>
                         <ul>
                             <!-- 四级类别开始 -->
                             [@shop_Category parentId=ctg1.id]
                             [#list tag_list as ctg2]
                             [#if ctg2.child?size&gt;0]
                             <li class="child">

                                 <a href="${ctg2.url!}" title="${ctg2.name!}">${ctg2.name!}</a>
                                 <ul>
                                     <!-- 五级类别开始 -->
                                     [@shop_Category parentId=ctg2.id]
                                     [#list tag_list as ctg3]
                                     <li>

                                         <a href="${ctg3.url!}" title="${ctg3.name!}">${ctg3.name!}</a>
                                     </li>
                                     [/#list]
                                     [/@shop_Category]
                                     <!-- 五级类别结束 -->
                                 </ul>
                             </li>
                             [#else]
                             <li>
                                 <a href="${ctg2.url!}" title="${ctg2.name!}">${ctg2.name!}</a></li>
                             [/#if]
                             [/#list]
                             [/@shop_Category]
                             <!-- 四级类别结束 -->
                         </ul>
                         [#else]
                         <li>
                             <a href="${ctg1.url!}" title="${ctg1.name!}">${ctg1.name!}</a>
                         </li>
                         [/#if]
                     [/#list]
                     [/@shop_Category]
                     <!-- 三级类别结束 -->
                </ul>
                </li>
            [#else]
            <li>
                <a href="${ctg.url!}" title="${ctg.name!}">${ctg.name!}</a>
            </li>
            [/#if]
            [/#list]
            [/@shop_Category]
            <!-- 二级类别结束 -->
            [/#if]
        </ul>
        <!-- 顶级类别结束 -->
        [#else]
        <!--其他级别类别开始 -->
        <!-- 一级类别开始 -->
        <li>
            <a href="${category.parent.url!}" title="${category.parent.name!}"><span class="am-icon-home"></span>${category.parent.name!}</a></li>
        <ul class="am-list am-collapse admin-sidebar-sub am-in" id="collapse-nav">
            <!-- 二级类别 开始-->
            [#if category.parent.child?size&gt;0]
            [@shop_Category parentId=category.parent.id]
            [#list tag_list as ctg]
            [#if ctg.child?size&gt;0]
            <li>

                <a href="${ctg.url!}" title="${ctg.name!}">${ctg.name!}</a>
                <ul
                [#if ctg.id==category.id]class="show"[/#if]>
                <!-- 三级类别 开始-->
                [@shop_Category parentId=ctg.id]
                [#list tag_list as ctg1]
                [#if ctg1.child?size&gt;0]
            <li>

                <a href="${ctg1.url!}" title="${ctg1.name!}">${ctg1.name!}</a>
                <ul
                [#if ctg1.id==category.id]class="show"[/#if]>
                <!-- 四级类别开始 -->
                [@shop_Category parentId=ctg1.id]
                [#list tag_list as ctg2]
                [#if ctg2.child?size&gt;0]
            <li>

                <a href="${ctg2.url!}" title="${ctg2.name!}">${ctg2.name!}</a>
                <ul
                [#if ctg2.id==category.id]class="show"[/#if]>
                <!-- 五级类别开始 -->
                [@shop_Category parentId=ctg2.id]
                [#list tag_list as ctg3]
            <li>

                <a href="${ctg3.url!}" title="${ctg3.name!}">${ctg3.name!}</a>
            </li>
            [/#list]
            [/@shop_Category]
            <!-- 五级类别结束 -->
        </ul>
        </li>
        [#else]
        <li>
            <a href="${ctg2.url!}" title="${ctg2.name!}">${ctg2.name!}</a></li>
        [/#if]
        [/#list]
        [/@shop_Category]
        <!-- 四级类别结束 -->
        </ul>
        </li>
        [#else]
        <li>
            <a href="${ctg1.url!}" title="${ctg1.name!}">${ctg1.name!}</a>
        </li>
        [/#if]
        [/#list]
        [/@shop_Category]
        <!-- 三级类别 结束-->
        </ul>
        </li>
        [#else]
        <li>
            <a href="${ctg.url!}" title="${ctg.name!}">${ctg.name!}</a>
        </li>
        [/#if]
        [/#list]
        [/@shop_Category]
        <!-- 二级类别 结束-->
        [/#if]
        </ul>
        <!-- 其他级别类别结束-->
        [/#if]

            </ul>

        <div class="am-panel am-panel-default admin-sidebar-panel">
            <div class="am-panel-bd">
                <p><span class="am-icon-bookmark"></span> </p>

            </div>
        </div>
        </div>
    </div>

